
import { on } from 'dom-native';
import { getUserContext } from '../web/src/ts/user-ctx';

//#region    ---------- Start Application ---------- 
//// Start the application 
on(document, 'APP_LOADED', async function () {
	refreshPage();
});

async function refreshPage() {

	const uc = await getUserContext();
	if (!uc) {
		document.body.innerHTML = '<v-login></v-login>'
	} else {
		document.body.innerHTML = '<v-main></v-main>';

	}

}
//#endregion ---------- /Start Application ----------

